const getFormatDate = type => {
	const date = new Date();
	let year = date.getFullYear();
	let month = date.getMonth() + 1;
	let day = date.getDate();

	if (type === 'start') {
		year = year - 2;
	} else if (type === 'end') {
		year = year + 10;
	}
	month = month > 9 ? month : '0' + month;
	day = day > 9 ? day : '0' + day;
	return `${year}-${month}-${day}`;
};

const currentDate = getFormatDate({
	format: true
});


module.exports = {
	getFormatDate: getFormatDate,
	order: {
		company_title: '请选择',
		order_nature: '请选择',
		news_type: '请选择',
		mode: '请选择',
		hotel: '',
		wedding_company: '',
		banquet_company: '',
		wedding_package: '',
		baby_company: '',
		meeting_company: ''
	},
	orderParams: {
		company_id: 0,
		order_nature: 0,
		contract_no: '',
		news_type: '-1',
		audit_type: '', // 审批类型
		cooperation_mode: 0,
		hotel_id: 0,
		banquet_hall_id: [],
		banquet_hall_name: '',
		bridegroom: '',
		bridegroom_mobile: '',
		bride: '',
		bride_mobile: '',
		sign_date: currentDate, // 签约时间
		event_date: '请选择', // 举办时间
		id_card: '',
		home_address: '',
		recommend_salesman: '',
		prepay_money: '', // 定金/意向金
		earnest_money: 0,
		earnest_money_date: currentDate,
		middle_money: '',
		middle_money_date: '',
		tail_money: 0,
		tail_money_date: '',
		parent_totals: 0,
		totals: 0,
		complete: 0, // 默认订单0；0:订单，98；
		contractInfo_remark: '',
		image: [], // 合同图片
		receipt_img: [], // 小票图片
		note_img: [], // 收据图片
		banquet_type: [] //厅类型 1午宴 2晚宴
	},
	// 婚宴信息
	banquetParams: {
		company_id: 0,
		table_amount: '',
		table_price: '',
		banquet_discount: '',
		banquet_totals: 0
	},
	// 婚庆信息
	weddingParams: {
		company_id: 0,
		wedding_package_id: '',
		product_no: '',
		wedding_discount: '',
		wedding_package_price: '',
		wedding_totals: 0
	},
	babyParams: {
		company_id: 0,
		customer_name: '',
		customer_mobile: '',
		party_remark: '',
		arrangement: '', // 布置
		table_amount: '',
		food_totals: 0,
		table_price: '',
		baby_discount: '',
		baby_totals: 0
	},
	meetingParams: {
		company_id: 0,
		customer_company: '', // 公司名称
		address: '', // 地址
		arrangement: '', // 布置费用
		food_totals: '', // 餐饮费用
		meeting_totals: 0
	},
	// 活动信息
	activitiesParams: {
		company_id: 0,
		start_date: '', // 活动开始日期
		end_date: '', // 活动结束日期
		position: "", // 活动场地
	},
	// 结算信息
	settleParams: {
		table_amount: 0,
		table_price: 0,
		settle_totals: 0,
		settle_percent: '',
		settle_time: '请选择',
		settle_real_total: 0
	},
	// 收款信息
	incomeParams: {
		receivable_no: '',
		income_payment: '',
		income_payment_text: '请选择',
		income_type: 1,
		income_type_text: '请选择',
		income_item_price: '',
		income_date: currentDate
	},
}
